#!/bin/bash
#delete previous files
rm -r segfaultexample.py segfaultexample_wrap.c segfaultexample_wrap.o segfaultexample.o _segfaultexample.so

swig -python segfaultexample.i
gcc -c segfaultexample.c segfaultexample_wrap.c -I/home/local/MSI/ysun/.pyenv/versions/3.4.1/include/python3.4m
ld -shared segfaultexample.o segfaultexample_wrap.o -o _segfaultexample.so